#ifndef CHATINTERFACE_H
#define CHATINTERFACE_H

#include <QWidget>
#include <request/friendrequest.h>
#include <request/filerequest.h>
#include <request/friendrequest.h>
#include <QJsonDocument>
#include <entity/result.h>
#include "pages/Settings.h"

namespace Ui {
class ChatInterface;
}

class ChatInterface : public QWidget
{
    Q_OBJECT

public:

    explicit ChatInterface(int current_id,QWidget *parent = nullptr);

    ~ChatInterface();

    void mouseMoveEvent(QMouseEvent *);

    void mousePressEvent(QMouseEvent *);

private slots:

    void onFriendFinished(MyNamespace::Result<std::vector<FriendInfo>> friend_list);

    void on_myInformation_clicked();

    void on_pushButton_clicked();

    void on_toolButton_4_clicked();

    void on_toolButton_3_clicked();

    void on_toolButton_2_clicked();

    void on_toolButton_clicked();

    void on_pushButton_7_clicked();

private:

    int current_id;

    Ui::ChatInterface *ui;

    bool is_drag = false;

    Settings *set = nullptr;

    QPoint start_pos;

    Friendrequest *friend_request = nullptr;

    FileRequest *file_request = nullptr;

};

#endif // CHATINTERFACE_H
